package com.yc.sole.erp.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yc.sole.framework.mybatis.entity.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 材料表
 *
 * @author yizuomin
 * @date 2024/1/24 19:45
 **/
@Data
@Entity
@Table(name = "erp_material")
@TableName("erp_material")
public class Material extends BaseEntity {

    /**
     * id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 材料名称
     */
    @Column(columnDefinition = "VARCHAR(50) NOT NULL COMMENT '材料名称'")
    private String name;
    /**
     * 单位
     */
    @Column(columnDefinition = "VARCHAR(10) NOT NULL COMMENT '单位'")
    private String unit;
    /**
     * 含税单价
     */
    @Column(columnDefinition = "DECIMAL(18,6) NOT NULL COMMENT '含税单价'")
    private BigDecimal unitPrice;
    /**
     * 备注
     */
    @Column(columnDefinition = "VARCHAR(255) COMMENT '备注'")
    private String remark;
}
